<template>
	<div class="tabel_Background1">
		<div class="tabel_Background-wra">
			<div class="title-wra">
				<div id="title1">
					<span class="title-text">{{ title }}</span>
				</div>
				<div id="title2">
					<div class="border-cls">
						<div class="border-text" @click="Switch()">切换</div>
					</div>
				</div>
			</div>
			<div class="isShow" v-if="isShow">
				<MtableForm />
			</div>
			<div class="isShow" v-if="!isShow">
				<MtableHidden class="HiddenTable" />
			</div>
		</div>
	</div>
</template>

<script>
	import MtableHidden from "../../components/item/MtableHidden.vue";
	import MtableForm from "../../components/item/MtableForm.vue";
	export default {
		name: "Ltable",
		components: {
			MtableHidden,
			MtableForm
		},
		props: {
			title: String,
		},
		data() {
			return {
				isShow: true
			};
		},
		methods: {
			Switch() {
				this.isShow = !this.isShow;
			},
			handleHome(val) {
				this.$router.replace("/");
				sessionStorage.clear("wellName");
			}
		}
	};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scoped>
	.tabel_Background1 {
		margin-bottom: 5px;
		width: 98%; //3.02rem;
		min-width: 2.96rem;
		height: 49%;
		margin-left: 1%;
		box-sizing: border-box;
		margin-bottom: 1%;
	}

	.tabel_Background-wra {
		width: 100%;
		min-width: 2.96rem;
		height: 100%;
		// border: 1px solid rgb(12, 50, 107);
		background-image: url("../../assets/bg_4@2x.png");
		background-repeat: no-repeat;
		background-size: 100% 100%;
		padding: 2%;
		box-sizing: border-box;
	}

	.title-wra {
		display: flex;
		justify-content: space-between;
		width: 100%;
		height: 10%;
	}

	#title1 {
		width: 23%; //3.02rem;
		height: 100%;
		min-width: 2.96rem;
		text-align: center;
		font-size: 6px;
		background-image: url("../../assets/title_outline@2x.png");
		background-repeat: no-repeat;
		background-size: 100% 100%; //cover;
		position: relative;
	}

	.title-text {
		position: absolute;
		left: 5%;
		top: 17%;
		color: #21beeb;
		font-weight: bold;
	}

	#title2 {
		width: 5%;
		height: 100%;
		position: relative;
	}

	.border-cls {
		font-size: 9px;
		line-height: 200%;
		color: #339ada;
		background-image: url("../../assets/btn_leibie_pressed@2x.png");
		background-repeat: no-repeat;
		background-size: 100% 100%;
		cursor: pointer;
	}

	.isShow {
		z-index: 2;
		height: 0;
		position: relative;
		width: 100%;
		height: 90%;

		.container {
			width: 100%;
			height: 100%;
		}
	}
</style>
